package dataStructures;

import java.util.Collection;
import java.util.Map;
import java.util.TreeMap;

/**
 * Created with IntelliJ IDEA.
 * User: vikas
 * Date: 5/22/12
 * Time: 9:00 AM
 * To change this template use File | Settings | File Templates.
 */
public class UndirectedGraph {

    class GraphNode<T extends Comparable<? super T>>{

        T value;
        Map< GraphNode<T>, Double> neighborsAndWeights;

        GraphNode(T value, Map< GraphNode<T>, Double> neighborsAndWeights) {
            this.value = value;
            this.neighborsAndWeights = neighborsAndWeights;
        }

        GraphNode(T value) {
            this.value = value;
        }

        public void addNeighbor(T value, double weight){
            if(neighborsAndWeights==null){
                neighborsAndWeights = new TreeMap<GraphNode<T>, Double>(new ModifiedComparator());
            }
        }

        public void deleteNode(){
            if(neighborsAndWeights!=null){

            }
        }
    }
}
